package com.zuo03;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test1 {
    @Test
    public void test1(){
        ApplicationContext ac=
                new ClassPathXmlApplicationContext("applicationContext.xml");
        Demo demo=(Demo)ac.getBean("demo");
        System.out.println(demo);
        ((ClassPathXmlApplicationContext)ac).close();
    }
}
